from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep

driver=webdriver.Firefox()
driver.get('http://10.59.9.14:7003/')
sleep(5)

driver.find_element(By.XPATH,'//a[@href="/home/login.html"]').click()
sleep(2)

dl=driver.find_element(By.CLASS_NAME,'reg-new').text
print(dl)

driver.find_element(By.XPATH,'/html/body/div[4]/div/div[1]/div[2]/form/div[1]/span[2]/input').send_keys('13811033962')
driver.find_element(By.NAME,'password').send_keys('123456')
sleep(5)
driver.find_element(By.CSS_SELECTOR,'.finish-btn').click()
sleep(5)

log=driver.find_element(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a').text
print(log)

driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/ul/li[6]/a').click()
sleep(2)

driver.find_element(By.XPATH,'//img[@class="lazy" and @src="/uploads/images/20250718/8f9b2b1a0c98f41908c80ee3383f445c.png"]').click()
sleep(2)

driver.find_element(By.XPATH,'/html/body/div[5]/div/div[2]/form/div/div[4]/div[1]/div[1]/div[2]/span[1]').click()
driver.find_element(By.XPATH,'/html/body/div[5]/div/div[2]/form/div/div[4]/div[1]/div[1]/div[2]/span[1]').click()
driver.find_element(By.XPATH,'/html/body/div[5]/div/div[2]/form/div/div[4]/div[1]/div[1]/div[2]/span[1]').click()
sleep(2)

driver.find_element(By.PARTIAL_LINK_TEXT,'立即').click()
sleep(2)

qr=driver.find_element(By.LINK_TEXT,'确认订单').text
print(qr)

driver.find_element(By.LINK_TEXT,'下一步').click()
sleep(2)

driver.quit()











